import base64
import hashlib


def md5(pwd):
    md5 = hashlib.md5()
    md5.update(pwd.encode('utf-8'))
    password_md5 = md5.digest()
    password = base64.b64encode(password_md5).decode('utf-8')

    return password
